#ifndef FILESSELECTOR_H
#define FILESSELECTOR_H

#include <QtWidgets/QDialog>
#include "ui_FilesSelector.h"

class QDirectoryModel;
class QFileNameModel;
class QStringListModel;

class QFilesSelector : public QDialog
{
	Q_OBJECT

public:
	QFilesSelector(QWidget *parent = 0);
	~QFilesSelector();

private:
	void connectSlots();
	void setCurrentDirectory(const QString& qsDirectory);
	void setSelectedFiles(const QStringList& qslFileList);
	void addFileToSelected(const QString& qsFile);
	void addFilesToSelected(const QStringList& qslFileList);

private slots:
	void treeViewDirectorySlotClicked(const QModelIndex& index);
	void treeViewFileNameSlotClicked(const QModelIndex& index);
	void treeViewFileNameSlotDoubleClicked(const QModelIndex& index);
	void listViewSelectedFilesSlotClicked(const QModelIndex& index);
	void listViewSelectedFilesSlotDoubleClicked(const QModelIndex& index);
	void pushButtonAddSlotClicked();
	void pushButtonAddAllSlotClicked();
	void pushButtonAddTreeSlotClicked();
	void pushButtonRemoveTreeSlotClicked();
	void pushButtonRemoveFileSlotClicked();
	void pushButtonRemoveAllSlotClicked();

private:
	Ui::QFilesSelectorClass ui;
	QDirectoryModel* m_pDirectoryModel;			// Directory
	QFileNameModel* m_pFileNameModel;			// FileName
	QStringListModel* m_pSelectedFilesModel;	// SelectedFiles
};

#endif // FILESSELECTOR_H
